package com.example.network;

import java.util.ArrayList;
import java.util.List;

import com.example.network.HttpEngine.KeyValue;

public abstract class Action
{
	/**
	 * 数据上传地址
	 */
	// public static final String BASE = "http://www.tzydb.com/eloan/gateWay.htm";
	
	// public static final String BASE = "http://www.tzydb.com:8081/eloan/gateWay.htm";
	
	public static final String BASE = "http://www.tzydb.com:8082/eloan/gateWay.htm";
	
	public List<KeyValue> keyValue = new ArrayList<KeyValue>();
	
	public Action()
	{
	}
	
	protected final String tag = this.getClass().getSimpleName();
	
	public String cookie = null;
	
	/** 数据请求类型 */
	public String type = "POST";
	
	public abstract String getAddress();
	
	public String postToService()
	{
		return HttpEngine.formPost(BASE + getAddress(), keyValue, cookie);
	}
}
